package com.nine.design.pay.v2.impl;

import com.nine.design.pay.v2.HandlerStrategy;
import com.nine.design.pay.v2.HandlerStrategyFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ZfbHandlerStrategyV2 implements HandlerStrategy {


    @Override
    public void pay() {
        log.info("before：查询账户余额。。。。。。。。");
        log.info("【实际操作】支付宝支付...................");
        log.info("after：短信通知。。。。。。。。。");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        // 系统启动，将微信支付策略加入到策略容器中
        HandlerStrategyFactory.register("zfb", this);
    }
}
